﻿@model MySite2.Areas.RedZone.Helpers.PaginatedListBook
@for (int i = 1; i <= Model.TotalPages; i++)
{
    if (i == Model.PageIndex)
    {
    <span>Page @i</span>
    }
    else
    { 
    <a href="@Url.Action("index", new { pageNumber = @i })"><span>Page @i</span></a>
    }
}